import jieba

# 简单的情感词典（可以扩展）
positive_words = {"喜欢", "高兴", "开心", "满意", "优秀", "赞"}
negative_words = {"失望", "糟糕", "差劲", "生气", "愤怒", "后悔"}

def sentiment_analysis(text):
    words = jieba.lcut(text)  # 分词
    pos_count = sum(1 for word in words if word in positive_words)
    neg_count = sum(1 for word in words if word in negative_words)

    if pos_count > neg_count:
        return "正面情感 😊"
    elif neg_count > pos_count:
        return "负面情感 😠"
    else:
        return "中性 😐"

# 测试
text1 = "这款手机真的很好，我很喜欢！"
text2 = "质量太差了，太让我失望了！"

print(sentiment_analysis(text1))  # 输出: 正面情感 😊
print(sentiment_analysis(text2))  # 输出: 负面情感 😠
